﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MyLibrary.ThreeLayer.DataAccess.Attributes
{
    /// <summary>
    /// 关系属性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public class RelationAttribute : Attribute
    {
        public readonly RelationType _RelationType;
        public readonly string _RelationTableName;
        public readonly Type _RelationTarget;

        public RelationAttribute(Type t, RelationType type)
        {
            this._RelationTarget = t;
            this._RelationType = type;
        }

        public RelationAttribute(Type t, RelationType type, string table)
        {
            this._RelationTarget = t;
            this._RelationType = type;
            this._RelationTableName = table;
        }
    }
}
